Skip to content

Crud exception rethrow #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

DifferentialOrange
Copy link
Member

Before this patch, all DatabaseError exception, except for ER_NO_SUCH_PROC and ER_ACCESS_DENIED ones, were silently ignored. It resulted in "UnboundLocalError: local variable 'crud_resp' referenced before assignment" instead of a proper error.

In most cases, crud API response process assumes that there are
always two response values, which is rather uncommon. The reason of that
is internal crud wrappers [1]. This patch reworks response process a bit
to more carefully process this unusual case and to not confuse
developers.

1. https://github.com/tarantool/crud/blob/53457477974fed42351cbd87f566d11e9f7e39bb/crud/common/schema.lua#L88
Before this patch, all DatabaseError exception, except for
ER_NO_SUCH_PROC and ER_ACCESS_DENIED ones, were silently ignored.
It resulted in "UnboundLocalError: local variable 'crud_resp' referenced
before assignment" instead of a proper error.
DifferentialOrange added a commit that referenced this pull request Sep 19, 2023
Overview

  This release fixes crud API exception rethrow bug.

Fixed
   - Exception rethrow in crud API (PR #310).
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/crud-error-rethrow branch from b5eb5d0 to e0c4a96 Compare September 19, 2023 14:48
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/crud-error-rethrow branch from e0c4a96 to fdf297e Compare September 19, 2023 15:39
@DifferentialOrange DifferentialOrange merged commit fea0d5f into master Sep 20, 2023
@DifferentialOrange DifferentialOrange deleted the DifferentialOrange/crud-error-rethrow branch September 20, 2023 06:13
DifferentialOrange added a commit that referenced this pull request Sep 20, 2023
Overview

  This release introduce several bugfixes and behavior improvements.

Fixed

  - Exception rethrow in crud API (PR #310).
  - Work with timestamps larger than year 2038 for some platforms
    (like Windows) (PR #311). It covers
    - building new `tarantool.Datetime` objects from timestamp,
    - parsing datetime objects received from Tarantool.
@DifferentialOrange DifferentialOrange mentioned this pull request Sep 20, 2023
DifferentialOrange added a commit that referenced this pull request Sep 20, 2023
Overview

  This release introduce several bugfixes and behavior improvements.

Fixed

  - Exception rethrow in crud API (PR #310).
  - Work with timestamps larger than year 2038 for some platforms
    (like Windows) (PR #311). It covers
    - building new `tarantool.Datetime` objects from timestamp,
    - parsing datetime objects received from Tarantool.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants